import cv2

img = cv2.imread('image.jpg')
channels = img.shape[2] # 返回一个包含图像三个通道（BGR）的列表
print("Channels: ", channels)